// 简单的轮播图效果
let currentIndex = 0;
const images = document.querySelectorAll('.carousel-image');
const totalImages = images.length;

function showImage(index) {
    const carouselContainer = document.querySelector('.carousel-container');
    const offset = -index * 393; // 偏移量
    carouselContainer.style.transform = `translateX(${offset}px)`;
}

function nextImage() {
    currentIndex = (currentIndex + 1) % totalImages;
    showImage(currentIndex);
}

// 每3秒轮播一次
setInterval(nextImage, 3000);


